package cn.wolfcode.crm5.controller;

import cn.wolfcode.crm5.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/employee")
public class EmployeeController {

    @Autowired
    private IEmployeeService employeeService;

    @RequestMapping("/list")
    public String list(Model model){
        model.addAttribute("employees",employeeService.list());

        return "/employee/list";
    }
}
